cmake_minimum_required(VERSION 3.22.1)
project("rtp2pcamera")

#rtp2p 路径
set(RTP2P_PATH ${CMAKE_SOURCE_DIR}/ppcs)

#libx264
add_library(librtapi SHARED IMPORTED)
set_target_properties(librtapi PROPERTIES IMPORTED_LOCATION ${RTP2P_PATH}/libs/${CMAKE_ANDROID_ARCH_ABI}/librtapi.so)


#rtp2p
include_directories(${RTP2P_PATH}/code)
#rtp2p code
include_directories(${RTP2P_PATH}/include)

#编码 RTP2P
FILE(GLOB RTP2P_CPP ${RTP2P_PATH}/code/*.cpp)

add_library(${CMAKE_PROJECT_NAME} SHARED
        rtp2pcamera.cpp
        ${RTP2P_CPP})

target_link_libraries(${CMAKE_PROJECT_NAME}
        android
        librtapi
        log)